﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;

namespace TableTop.DataManagement.Configuration
{
    public static class TableTopConfiguration
    {
        public static String AddonPath
        {
            get
            {
                String strAddonPath = String.Empty;

                try
                {
                    strAddonPath = ConfigurationManager.AppSettings["AddonPath"];
                }
                catch (ConfigurationErrorsException cfgsexc)
                {
                    Debug.WriteLine(cfgsexc.ToString());
                    throw;
                }
                catch (KeyNotFoundException knfexc)
                {
                    Debug.WriteLine(knfexc.ToString());
                    throw;                   
                }

                return strAddonPath;
            }
        }

        public static String DataPath
        {
            get
            {
                String strDataPath = String.Empty;

                try
                {
                    strDataPath = ConfigurationManager.AppSettings["DataPath"];
                }
                catch (ConfigurationErrorsException cfgsexc)
                {
                    Debug.WriteLine(cfgsexc.ToString());
                    throw;
                }
                catch (KeyNotFoundException knfexc)
                {
                    Debug.WriteLine(knfexc.ToString());
                    throw;
                }

                return strDataPath;
            }
        }
    }
}
